<template>
  <div class="about">
    <h1>这是详情页哒</h1>
    <div class="box">
      <img class="pic" v-for="(item,index) in datas" :key="index" :src="item.img" alt />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      datas: []
    };
  },
  mounted() {
    var id = this.$route.query.id;
    var url = "http://localhost:8080/home/detail?id=" + id;
    this.axios(url).then(res => {
      this.datas = res.data;
      console.log(res.data);
    });
  }
};
</script>
<style scoped>
.about {
  width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center
 
}
.box{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
   justify-content: space-around;
  flex-wrap: wrap;
}
.pic {
  width: 180px;
  height: 180px;
  margin-bottom: 10px;
}
</style>